Þ¥bonds€¬cell_resultsÞ@Ù$921bba30-dcbc-11ea-13c3-87554722da8aЦqueued¤logs�§running¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ­†šç5/°persist_js_state·has_pluto_hook_features§cell_idÙ$921bba30-dcbc-11ea-13c3-87554722da8a¹depends_on_disabled_cells§runtimeÎIµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$5c4a5f22-d471-11ea-260f-9338d8bfa2d6Цqueued¤logs�§running¦output†¤bodyÚ

Keep working on it!

Let's fix the above cell before we move on! Find the formula to calculate the area using pi and r.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†šëjè°persist_js_state·has_pluto_hook_features§cell_idÙ$5c4a5f22-d471-11ea-260f-9338d8bfa2d6¹depends_on_disabled_cells§runtimeÎB†µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$8cada086-daa5-11ea-220c-0f660938b604Цqueued¤logs�§running¦output†¤body¼
¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†šåEí°persist_js_state·has_pluto_hook_features§cell_idÙ$8cada086-daa5-11ea-220c-0f660938b604¹depends_on_disabled_cells§runtimeÎE¸µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$f907e46a-d471-11ea-07e5-f30e2aab3d08Цqueued¤logs�§running¦output†¤bodyÚY

The diameter of a pizza is often stated on a menu so let's define a formula to calculate the area of a pizza given the diameter d.

We do this by writing a formula like this: area(d) = pi * (d/2)^2

Let's write that below:

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†—ã‘°persist_js_state·has_pluto_hook_features§cell_idÙ$f907e46a-d471-11ea-07e5-f30e2aab3d08¹depends_on_disabled_cells§runtimeÎTµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$edb95b14-d473-11ea-3a5a-77382d31f941Цqueued¤logs�§running¦output†¤bodyÚ 

Finding the best pizza deal

Let's see if a larger pizza is a better value by calculating the price per area. There are 4 sizes: small, medium, large, extra large with the following prices:

SizeDiameter (inches)Price ($)
small913.10
medium1320.95
large1524.90
XL1730.95

1. How many small pizzas is the same as one XL pizza?

Edit the expression below:

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†—ä^}°persist_js_state·has_pluto_hook_features§cell_idÙ$edb95b14-d473-11ea-3a5a-77382d31f941¹depends_on_disabled_cells§runtimeÎb4”µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$70e85498-d500-11ea-35af-474574f5c011Цqueued¤logs�§running¦output†¤body¡1¤mimeªtext/plain¬rootassignee¯two_medium_deal²last_run_timestampËAÚ­†šµ�°persist_js_state·has_pluto_hook_features§cell_idÙ$70e85498-d500-11ea-35af-474574f5c011¹depends_on_disabled_cells§runtimeÍ'صpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$e5e0a0da-d45c-11ea-1042-e9b5d0654d4fЦqueued¤logs�§running¦output†¤bodyÙo

Fix the value of c below to make it c = a * b

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†—ã73°persist_js_state·has_pluto_hook_features§cell_idÙ$e5e0a0da-d45c-11ea-1042-e9b5d0654d4f¹depends_on_disabled_cells§runtimeÎ6 µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$cb419286-d4ff-11ea-1d7f-af5c8574b775Цqueued¤logs�§running¦output†¤bodyÚJ

3. Is this a good deal?

San Marinos has a special "Buy two medium pizzas and save $5". Is this a better deal than buying a extra-large pizza?

Calculate the total cost of two medium pizzas deal (saving $5):

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†—äÝH°persist_js_state·has_pluto_hook_features§cell_idÙ$cb419286-d4ff-11ea-1d7f-af5c8574b775¹depends_on_disabled_cells§runtimeÎ�Óµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$2ea7f162-d460-11ea-0e8e-25340e2e64daЦqueued¤logs�§running¦output†¤body£2.5¤mimeªtext/plain¬rootassignee£avg²last_run_timestampËAÚ­†šx«Þ°persist_js_state·has_pluto_hook_features§cell_idÙ$2ea7f162-d460-11ea-0e8e-25340e2e64da¹depends_on_disabled_cells§runtimeÍ'8µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$d9575e9c-d472-11ea-1eda-2d335d039f28Цqueued¤logs�§running¦output†¤bodyÚ!

Now we have a function called area that we can pass any diameter and it will return the area of a pizza (or circle), let's try that with the pizza from before with area(2*r) to get the area of the pizza:

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†—㵕°persist_js_state·has_pluto_hook_features§cell_idÙ$d9575e9c-d472-11ea-1eda-2d335d039f28¹depends_on_disabled_cells§runtimeÎ âµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$cb36a9ee-d472-11ea-1835-bf7963137e18Цqueued¤logs�§running¦output†¤bodyÙ%area (generic function with 1 method)¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ­†š­V6°persist_js_state·has_pluto_hook_features§cell_idÙ$cb36a9ee-d472-11ea-1835-bf7963137e18¹depends_on_disabled_cells§runtimeÎÚܵpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$4119d19e-dcbc-11ea-3ec8-271e88e1afcaЦqueued¤logs�§running¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ­†šæ:÷°persist_js_state·has_pluto_hook_features§cell_idÙ$4119d19e-dcbc-11ea-3ec8-271e88e1afca¹depends_on_disabled_cells§runtimeΠsµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$76c11174-d474-11ea-29c5-81856d47cf74Цqueued¤logs�§running¦output†¤body³0.15783649977634118¤mimeªtext/plain¬rootassignee¦medium²last_run_timestampËAÚ­†š°*þ°persist_js_state·has_pluto_hook_features§cell_idÙ$76c11174-d474-11ea-29c5-81856d47cf74¹depends_on_disabled_cells§runtimeÍ1ˆµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$f5f89724-d507-11ea-0a93-6d904f36bbe4Цqueued¤logs�§running¦output†¤bodyÙ'pieces (generic function with 1 method)¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ­†šÆ á°persist_js_state·has_pluto_hook_features§cell_idÙ$f5f89724-d507-11ea-0a93-6d904f36bbe4¹depends_on_disabled_cells§runtimeÎq#µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$97bfd13c-dcc2-11ea-0067-ad8c2c6517fcЦqueued¤logs�§running¦output†¤bodyÙ}

To get an extra hint, figure out how many slices we can get from 5 cuts:

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†—æ °persist_js_state·has_pluto_hook_features§cell_idÙ$97bfd13c-dcc2-11ea-0067-ad8c2c6517fc¹depends_on_disabled_cells§runtimeÎÊyµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$48647ab2-daa5-11ea-0494-ef87be7cbf7cЦqueued¤logs�§running¦output†¤bodyÙÐ

Hint

A new cut will create the maximum number of new slices if it intersects all previous cuts.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†šä¹E°persist_js_state·has_pluto_hook_features§cell_idÙ$48647ab2-daa5-11ea-0494-ef87be7cbf7c¹depends_on_disabled_cells§runtimeÎGÁµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$5a6d1a8e-dcbc-11ea-272a-6f769c8d309cЦqueued¤logs�§running¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ­†šè+Ô°persist_js_state·has_pluto_hook_features§cell_idÙ$5a6d1a8e-dcbc-11ea-272a-6f769c8d309c¹depends_on_disabled_cells§runtimeÎ 2µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$a679bddc-d506-11ea-143a-6d4dcd70e918Цqueued¤logs�§running¦output†¤bodyÙ”

Hint

Try drawing it out on a piece of paper.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†ší�°persist_js_state·has_pluto_hook_features§cell_idÙ$a679bddc-d506-11ea-143a-6d4dcd70e918¹depends_on_disabled_cells§runtimeÎ éµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$a07e5c3e-d476-11ea-308c-718f8f128334Цqueued¤logs�§running¦output†¤bodyÙñ

Hint

Keep trying to get the right answer. Hint: you need to multiply the radius by 2 to convert it into the diameter.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†šë±â°persist_js_state·has_pluto_hook_features§cell_idÙ$a07e5c3e-d476-11ea-308c-718f8f128334¹depends_on_disabled_cells§runtimeÎ^ýµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$14158eb0-d45c-11ea-088f-330e45412320Цqueued¤logs�§running¦output†¤body¡2¤mimeªtext/plain¬rootassignee¡a²last_run_timestampËAÚ­†š¶J°persist_js_state·has_pluto_hook_features§cell_idÙ$14158eb0-d45c-11ea-088f-330e45412320¹depends_on_disabled_cells§runtimeÍ&Hµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$20a1e9cc-d500-11ea-3d9b-279c71bc20f1Цqueued¤logs�§running¦output†¤bodyÙ‹

Now calculate cost per area by taking the total cost of two medium pizzas and divide by the total area:

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†—å�°persist_js_state·has_pluto_hook_features§cell_idÙ$20a1e9cc-d500-11ea-3d9b-279c71bc20f1¹depends_on_disabled_cells§runtimeÎKµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$e80986c6-d509-11ea-12e3-f79a54b5ab31Цqueued¤logs�§running¦output†¤bodyƒ£msgÙ8TypeError: non-boolean (Missing) used in boolean contextªstacktrace‘Œªcall_short¯top-level scope§inlined£urlÀ¤pathÙu/home/fons/featured-slider-server/featured_fix/src/basic/Basic mathematics.jl#==#e80986c6-d509-11ea-12e3-f79a54b5ab31®source_packageÀ¤call¯top-level scopeªlinfo_type­Core.CodeInfo¤line¤fileÙ

Move the slider to change the number of cuts:

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†šÖ>%°persist_js_state·has_pluto_hook_features§cell_idÙ$bd9f3d24-d509-11ea-165d-3d465a0b4542¹depends_on_disabled_cells§runtimeÎÑ‚ðµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$6ae748b2-d503-11ea-1c51-6b2df24fd212Цqueued¤logs�§running¦output†¤bodyÙŸ

Hint

The cuts must go all the way across the pizza!

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†šì¿”°persist_js_state·has_pluto_hook_features§cell_idÙ$6ae748b2-d503-11ea-1c51-6b2df24fd212¹depends_on_disabled_cells§runtimeά�µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$04b010c0-d473-11ea-1767-136c7e26e122Цqueued¤logs�§running¦output†¤body²28.274333882308138¤mimeªtext/plain¬rootassignee¢A2²last_run_timestampËAÚ­†š®ݰpersist_js_state·has_pluto_hook_features§cell_idÙ$04b010c0-d473-11ea-1767-136c7e26e122¹depends_on_disabled_cells§runtimeÍ-xµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$d9c31dfa-d470-11ea-23b2-838975b71f7cЦqueued¤logs�§running¦output†¤bodyÚ¢

Writing your own math functions

The area of a pizza is $A = \pi r^2$. Lets try calculating the area of a pizza that has a radius of 6 inches (r = 6). Type pi to get the value of $\pi$ and r^2 to get the radius squared.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†š—Ý¥°persist_js_state·has_pluto_hook_features§cell_idÙ$d9c31dfa-d470-11ea-23b2-838975b71f7c¹depends_on_disabled_cells§runtimeÎ@Žäµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$962e6b86-d474-11ea-11a6-a1d11e33ae42Цqueued¤logs�§running¦output†¤body²0.1363555844621221¤mimeªtext/plain¬rootassignee¢xl²last_run_timestampËAÚ­†š²{á°persist_js_state·has_pluto_hook_features§cell_idÙ$962e6b86-d474-11ea-11a6-a1d11e33ae42¹depends_on_disabled_cells§runtimeÍIèµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$03249876-d508-11ea-16bb-fd5afed37a1fЦqueued¤logs�§running¦output†¤bodyÙl
Let's test your formula!
¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†—æI®°persist_js_state·has_pluto_hook_features§cell_idÙ$03249876-d508-11ea-16bb-fd5afed37a1f¹depends_on_disabled_cells§runtimeÎózµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$2814a1d4-dcc0-11ea-3d42-f52765e478feЦqueued¤logs�§running¦output†¤bodyÙñ

Hint

For each extra cut, start out with the solution for the previous number. When you add one extra cut, how many new slices do you get?

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†šâ!İpersist_js_state·has_pluto_hook_features§cell_idÙ$2814a1d4-dcc0-11ea-3d42-f52765e478fe¹depends_on_disabled_cells§runtimeÎåÓµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$8b12d200-d474-11ea-3035-01eccf39f917Цqueued¤logs�§running¦output†¤body³0.14090517628402466¤mimeªtext/plain¬rootassignee¥large²last_run_timestampËAÚ­†š±#�°persist_js_state·has_pluto_hook_features§cell_idÙ$8b12d200-d474-11ea-3035-01eccf39f917¹depends_on_disabled_cells§runtimeÍ4¨µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$6494e270-d503-11ea-38a7-df96e7f0a241Цqueued¤logs�§running¦output†¤body¡1¤mimeªtext/plain¬rootassignee¥cuts2²last_run_timestampËAÚ­†š¶ 6°persist_js_state·has_pluto_hook_features§cell_idÙ$6494e270-d503-11ea-38a7-df96e7f0a241¹depends_on_disabled_cells§runtimeÍ(xµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$f147b6cc-d4ff-11ea-05ad-6f5b441e5d1bЦqueued¤logs�§running¦output†¤body¥20.95¤mimeªtext/plain¬rootassignee¯two_medium_cost²last_run_timestampËAÚ­†š´4ø°persist_js_state·has_pluto_hook_features§cell_idÙ$f147b6cc-d4ff-11ea-05ad-6f5b441e5d1b¹depends_on_disabled_cells§runtimeÍ68µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$33b1975c-d45c-11ea-035f-ab76e46a31edЦqueued¤logs�§running¦output†¤bodyÙœ

Keep working on it!

The answer is not quite right.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†šéN'°persist_js_state·has_pluto_hook_features§cell_idÙ$33b1975c-d45c-11ea-035f-ab76e46a31ed¹depends_on_disabled_cells§runtimeÎÂÐfµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$1ba2c208-d4ff-11ea-0a8e-e75bf7e1c3e6Цqueued¤logs�§running¦output†¤bodyÙÊ

Hint

No need to copy these digits yourself - what should we assign to best_value?

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†šì€°persist_js_state·has_pluto_hook_features§cell_idÙ$1ba2c208-d4ff-11ea-0a8e-e75bf7e1c3e6¹depends_on_disabled_cells§runtime΋«Øµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$a42e4eb0-d474-11ea-316a-3d864451bc01Цqueued¤logs�§running¦output†¤bodyÙ�

Which size of pizza is the best deal? Write your answer below and assign it to the variable best_value.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†—ä²y°persist_js_state·has_pluto_hook_features§cell_idÙ$a42e4eb0-d474-11ea-316a-3d864451bc01¹depends_on_disabled_cells§runtimeÎñ³µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$e0cb2822-dcc2-11ea-2c85-5748bfe526dcЦqueued¤logs�§running¦output†¤bodyÙ]

Have you found the pattern? Write down the formula below:

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†—æ)í°persist_js_state·has_pluto_hook_features§cell_idÙ$e0cb2822-dcc2-11ea-2c85-5748bfe526dc¹depends_on_disabled_cells§runtimeεpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$2eb9a560-d507-11ea-3b8b-9d06678fe131Цqueued¤logs�§running¦output†¤bodyÙb

Now, how many pieces can be made with 4 cuts?

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†—å§°persist_js_state·has_pluto_hook_features§cell_idÙ$2eb9a560-d507-11ea-3b8b-9d06678fe131¹depends_on_disabled_cells§runtimeÎð›µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$50f0f6d6-d471-11ea-304e-8f72e7ef9d7eЦqueued¤logs�§running¦output†¤body¢36¤mimeªtext/plain¬rootassignee¡A²last_run_timestampËAÚ­†š˜¸°persist_js_state·has_pluto_hook_features§cell_idÙ$50f0f6d6-d471-11ea-304e-8f72e7ef9d7e¹depends_on_disabled_cells§runtimeÍ.àµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$3da812c6-d460-11ea-0170-79fbb6a4347cЦqueued¤logs�§running¦output†¤body¡8¤mimeªtext/plain¬rootassignee¦slices²last_run_timestampËAÚ­†šyFá°persist_js_state·has_pluto_hook_features§cell_idÙ$3da812c6-d460-11ea-0170-79fbb6a4347c¹depends_on_disabled_cells§runtimeÍ$hµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$5b07b8fe-d475-11ea-01aa-6b88d6ed8a05Цqueued¤logs�§running¦output†¤bodyÙ†

2. Calculate the cost per area of each pizza:

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†—äŽã°persist_js_state·has_pluto_hook_features§cell_idÙ$5b07b8fe-d475-11ea-01aa-6b88d6ed8a05¹depends_on_disabled_cells§runtimeοµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$30f0f882-d45c-11ea-2adc-7d84ecf8a7a6Цqueued¤logs�§running¦output†¤body¢10¤mimeªtext/plain¬rootassignee¡c²last_run_timestampËAÚ­†šf|‘°persist_js_state·has_pluto_hook_features§cell_idÙ$30f0f882-d45c-11ea-2adc-7d84ecf8a7a6¹depends_on_disabled_cells§runtimeÍ!èµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$f26d50da-d46b-11ea-0c2d-77ca13532b3dЦqueued¤logs�§running¦output†¤bodyÙœ

Keep working on it!

The answer is not quite right.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†šéøý°persist_js_state·has_pluto_hook_features§cell_idÙ$f26d50da-d46b-11ea-0c2d-77ca13532b3d¹depends_on_disabled_cells§runtimeÎQˆáµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$16ec3f32-d4ff-11ea-20e2-5bc6dd5db083Цqueued¤logs�§running¦output†¤body²0.2059189880991436¤mimeªtext/plain¬rootassigneeªbest_value²last_run_timestampËAÚ­†š³;*°persist_js_state·has_pluto_hook_features§cell_idÙ$16ec3f32-d4ff-11ea-20e2-5bc6dd5db083¹depends_on_disabled_cells§runtimeÍ$@µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$d1e3dec0-d507-11ea-1213-d37a9325ee2fЦqueued¤logs�§running¦output†¤bodyÚu

Are you starting to see a pattern? Can you figure out a formula for how many pieces of pizza can be made with "n" cuts? Make a table and fill in the number of pieces for a number of cuts and see if you can find the pattern:

CutsPieces
01
12
24
3
4
¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†—åç`°persist_js_state·has_pluto_hook_features§cell_idÙ$d1e3dec0-d507-11ea-1213-d37a9325ee2f¹depends_on_disabled_cells§runtimeÎ G7µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$57f024ae-d500-11ea-1cc4-ed28348fdf93Цqueued¤logs�§running¦output†¤bodyÙ~

Is it a better deal to get two medium pizzas for $5 off or to just buy an extra-large?

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†—å>’°persist_js_state·has_pluto_hook_features§cell_idÙ$57f024ae-d500-11ea-1cc4-ed28348fdf93¹depends_on_disabled_cells§runtimeÎ.µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$180c8fdc-d503-11ea-04ca-bf2c07fd1c17Цqueued¤logs�§running¦output†¤bodyÚ(

4. Advanced Problem

A new worker at a pizza shop was getting paid for cutting pizza into pieces. The pieces of pizza could be any size. Calculate the maximum number of pieces the worker could make with two cuts of the pizza.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†—åb°persist_js_state·has_pluto_hook_features§cell_idÙ$180c8fdc-d503-11ea-04ca-bf2c07fd1c17¹depends_on_disabled_cells§runtimeÎW”µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$444e2fa4-d460-11ea-12aa-57e0576c2d66Цqueued¤logs�§running¦output†¤body¡1¤mimeªtext/plain¬rootassignee¦pizzas²last_run_timestampËAÚ­†š”‡¾°persist_js_state·has_pluto_hook_features§cell_idÙ$444e2fa4-d460-11ea-12aa-57e0576c2d66¹depends_on_disabled_cells§runtimeÍ~µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$03664f5c-d45c-11ea-21b6-91cd647a07aaЦqueued¤logs�§running¦output†¤bodyÚœ

Mathematics in Julia �

This is an introduction to programming. Let's get started!

Let's make a calculator!

First let's do some simple math with setting a = 2, b = 6 and c = a * b. What will c equal?

Type in the cells (with the coloured background) below and press Shift-Enter or the click the right-arrow button (▶�) to the right to execute the cell after changing the values.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†šeÝø°persist_js_state·has_pluto_hook_features§cell_idÙ$03664f5c-d45c-11ea-21b6-91cd647a07aa¹depends_on_disabled_cells§runtimeÎFIȵpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$3823d09e-d474-11ea-194e-59b5805f303bЦqueued¤logs�§running¦output†¤body²0.2059189880991436¤mimeªtext/plain¬rootassignee¥small²last_run_timestampËAÚ­†š¯‹Û°persist_js_state·has_pluto_hook_features§cell_idÙ$3823d09e-d474-11ea-194e-59b5805f303b¹depends_on_disabled_cells§runtimeÍ4€µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$262b312a-d460-11ea-26c5-df30459effc5Цqueued¤logs�§running¦output†¤body¢10¤mimeªtext/plain¬rootassignee¦people²last_run_timestampËAÚ­†šgf°persist_js_state·has_pluto_hook_features§cell_idÙ$262b312a-d460-11ea-26c5-df30459effc5¹depends_on_disabled_cells§runtimeÍ"صpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$a05aae8e-d506-11ea-190f-57e9ce53b8b9Цqueued¤logs�§running¦output†¤body¡1¤mimeªtext/plain¬rootassignee¥cuts3²last_run_timestampËAÚ­†š¶Å�°persist_js_state·has_pluto_hook_features§cell_idÙ$a05aae8e-d506-11ea-190f-57e9ce53b8b9¹depends_on_disabled_cells§runtimeÍ& µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$a38cb92e-d45e-11ea-2959-05be909befb2Цqueued¤logs�§running¦output†¤bodyÚz

Now you have a calculator!

You did multiplication above. Here's how you do other mathematical operations:

OperationType This
add+
subtract-
multiply*
divide/
power^

Pizza Slices

Let's try this out on a problem. Let's say you want to order pizzas for 10 people (people = 10) and each person wants 2.5 slices on average (avg = 2.5). A pizza has 8 slices per pizza (slices = 8). How many pizzas should you order (pizzas = ?)? So we have the following

MeaningVariable
Number of peoplepeople
Average number of slices each person eatsavg
Number of slices on a piece of pizzaslices
¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†š“㊰persist_js_state·has_pluto_hook_features§cell_idÙ$a38cb92e-d45e-11ea-2959-05be909befb2¹depends_on_disabled_cells§runtimeÎ_qصpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$19eb2a82-d500-11ea-3782-596adc689382Цqueued¤logs�§running¦output†¤body²132.73228961416876¤mimeªtext/plain¬rootassignee¯two_medium_area²last_run_timestampËAÚ­†š´ß¤°persist_js_state·has_pluto_hook_features§cell_idÙ$19eb2a82-d500-11ea-3782-596adc689382¹depends_on_disabled_cells§runtimeÍ4¨µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$8700d986-d475-11ea-0d0e-790448cf92baЦqueued¤logs�§running¦output†¤bodyÚ1

Hint

The diameter of the XL pizza is 17 inches while the diameter of the small pizza is 9 inches. Use the area() function from before to find the area of each and divide them.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†šáéy°persist_js_state·has_pluto_hook_features§cell_idÙ$8700d986-d475-11ea-0d0e-790448cf92ba¹depends_on_disabled_cells§runtimeÎVlµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$4dff4b5e-d461-11ea-29c8-d548fdb5f08bЦqueued¤logs�§running¦output†¤bodyÙÐ

Edit the equation below to calculate the number of pizzas to order using the variables above for people, avg, and slices:

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†—ãc°persist_js_state·has_pluto_hook_features§cell_idÙ$4dff4b5e-d461-11ea-29c8-d548fdb5f08b¹depends_on_disabled_cells§runtimeÎ:sµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$637c26fa-d475-11ea-2c5b-2b0f4775b119Цqueued¤logs�§running¦output†¤body¡1¤mimeªtext/plain¬rootassignee¬smalls_in_xl²last_run_timestampËAÚ­†š®¨ß°persist_js_state·has_pluto_hook_features§cell_idÙ$637c26fa-d475-11ea-2c5b-2b0f4775b119¹depends_on_disabled_cells§runtimeÍ)Aµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$bae0cb62-dcc2-11ea-0667-512e1c407d40Цqueued¤logs�§running¦output†¤body¡1¤mimeªtext/plain¬rootassignee¥cuts5²last_run_timestampËAÚ­†š¸ c°persist_js_state·has_pluto_hook_features§cell_idÙ$bae0cb62-dcc2-11ea-0667-512e1c407d40¹depends_on_disabled_cells§runtimeÍ&Áµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$0d76d97c-d500-11ea-2433-e96c6fc43b05Цqueued¤logs�§running¦output†¤bodyÙR

Calculate the total area of two medium pizzas:

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†—äý‹°persist_js_state·has_pluto_hook_features§cell_idÙ$0d76d97c-d500-11ea-2433-e96c6fc43b05¹depends_on_disabled_cells§runtimeÎbµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$92b4a012-d503-11ea-15a2-1f3a446d3284Цqueued¤logs�§running¦output†¤bodyÙ 

Now what about 3 cuts across the pizza? What is the maximum number of pieces that can be made with 3 cuts?

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†—å„™°persist_js_state·has_pluto_hook_features§cell_idÙ$92b4a012-d503-11ea-15a2-1f3a446d3284¹depends_on_disabled_cells§runtimeÎÓ‹µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$3c12f2b4-d471-11ea-2d37-539f061f7cf2Цqueued¤logs�§running¦output†¤body¡6¤mimeªtext/plain¬rootassignee¡r²last_run_timestampËAÚ­†š•'¦°persist_js_state·has_pluto_hook_features§cell_idÙ$3c12f2b4-d471-11ea-2d37-539f061f7cf2¹depends_on_disabled_cells§runtimeÍ#Pµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$2ed4bb92-d45c-11ea-0b31-2d8e32ce7b44Цqueued¤logs�§running¦output†¤body¡6¤mimeªtext/plain¬rootassignee¡b²last_run_timestampËAÚ­†šOf°persist_js_state·has_pluto_hook_features§cell_idÙ$2ed4bb92-d45c-11ea-0b31-2d8e32ce7b44¹depends_on_disabled_cells§runtimeÍ Xµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$5a8ede88-d507-11ea-30d9-c99a67243781Цqueued¤logs�§running¦output†¤body¡1¤mimeªtext/plain¬rootassignee¥cuts4²last_run_timestampËAÚ­†š·d°persist_js_state·has_pluto_hook_features§cell_idÙ$5a8ede88-d507-11ea-30d9-c99a67243781¹depends_on_disabled_cells§runtimeÍ%µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$5df7eefc-d507-11ea-0d1f-45b224a04774Цqueued¤logs�§running¦output†¤bodyÙ´

Hint

Draw it out on a piece of paper. You can make more pieces with 4 cuts.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ­†šíif°persist_js_state·has_pluto_hook_features§cell_idÙ$5df7eefc-d507-11ea-0d1f-45b224a04774¹depends_on_disabled_cells§runtimeÎ €µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$b8644fb0-daa6-11ea-1e94-9bf46e7b0fadЦqueued¤logs�§running¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ­†šÚrï°persist_js_state·has_pluto_hook_features§cell_idÙ$b8644fb0-daa6-11ea-1e94-9bf46e7b0fad¹depends_on_disabled_cells§runtimeδµpublished_object_keys�¸depends_on_skipped_cells§errored±cell_dependenciesÞ@Ù$921bba30-dcbc-11ea-13c3-87554722da8a„´precedence_heuristic §cell_idÙ$921bba30-dcbc-11ea-13c3-87554722da8a´downstream_cells_map�¬keep_working”Ù$33b1975c-d45c-11ea-035f-ab76e46a31edÙ$f26d50da-d46b-11ea-0c2d-77ca13532b3dÙ$5c4a5f22-d471-11ea-260f-9338d8bfa2d6Ù$e80986c6-d509-11ea-12e3-f79a54b5ab31²upstream_cells_map…§@md_str�³Markdown.Admonition�«Markdown.MD�¨Markdown�¨getindex�Ù$5c4a5f22-d471-11ea-260f-9338d8bfa2d6„´precedence_heuristic §cell_idÙ$5c4a5f22-d471-11ea-260f-9338d8bfa2d6´downstream_cells_map€²upstream_cells_map‹§@md_str�¡A‘Ù$50f0f6d6-d471-11ea-304e-8f72e7ef9d7e¡r‘Ù$3c12f2b4-d471-11ea-2d37-539f061f7cf2¢pi�§correct‘Ù$5a6d1a8e-dcbc-11ea-272a-6f769c8d309c¬keep_working‘Ù$921bba30-dcbc-11ea-13c3-87554722da8a¡^�¡*�¢!=�¢==�¨getindex�Ù$8cada086-daa5-11ea-220c-0f660938b604„´precedence_heuristic §cell_idÙ$8cada086-daa5-11ea-220c-0f660938b604´downstream_cells_map€²upstream_cells_map†§@md_str�¡+�¤hint‘Ù$b8644fb0-daa6-11ea-1e94-9bf46e7b0fad¢==�¥cuts5‘Ù$bae0cb62-dcc2-11ea-0667-512e1c407d40¨getindex�Ù$f907e46a-d471-11ea-07e5-f30e2aab3d08„´precedence_heuristic §cell_idÙ$f907e46a-d471-11ea-07e5-f30e2aab3d08´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$edb95b14-d473-11ea-3a5a-77382d31f941„´precedence_heuristic §cell_idÙ$edb95b14-d473-11ea-3a5a-77382d31f941´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$70e85498-d500-11ea-35af-474574f5c011„´precedence_heuristic §cell_idÙ$70e85498-d500-11ea-35af-474574f5c011´downstream_cells_map�¯two_medium_deal�²upstream_cells_map€Ù$e5e0a0da-d45c-11ea-1042-e9b5d0654d4f„´precedence_heuristic §cell_idÙ$e5e0a0da-d45c-11ea-1042-e9b5d0654d4f´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$cb419286-d4ff-11ea-1d7f-af5c8574b775„´precedence_heuristic §cell_idÙ$cb419286-d4ff-11ea-1d7f-af5c8574b775´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$2ea7f162-d460-11ea-0e8e-25340e2e64da„´precedence_heuristic §cell_idÙ$2ea7f162-d460-11ea-0e8e-25340e2e64da´downstream_cells_map�£avg’Ù$a38cb92e-d45e-11ea-2959-05be909befb2Ù$f26d50da-d46b-11ea-0c2d-77ca13532b3d²upstream_cells_map€Ù$d9575e9c-d472-11ea-1eda-2d335d039f28„´precedence_heuristic §cell_idÙ$d9575e9c-d472-11ea-1eda-2d335d039f28´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$cb36a9ee-d472-11ea-1835-bf7963137e18„´precedence_heuristic §cell_idÙ$cb36a9ee-d472-11ea-1835-bf7963137e18´downstream_cells_map�¤area–Ù$04b010c0-d473-11ea-1767-136c7e26e122Ù$3823d09e-d474-11ea-194e-59b5805f303bÙ$76c11174-d474-11ea-29c5-81856d47cf74Ù$8b12d200-d474-11ea-3035-01eccf39f917Ù$962e6b86-d474-11ea-11a6-a1d11e33ae42Ù$19eb2a82-d500-11ea-3782-596adc689382²upstream_cells_map„¡^�¡/�¡*�¢pi�Ù$4119d19e-dcbc-11ea-3ec8-271e88e1afca„´precedence_heuristic §cell_idÙ$4119d19e-dcbc-11ea-3ec8-271e88e1afca´downstream_cells_map�¦almost’Ù$f26d50da-d46b-11ea-0c2d-77ca13532b3dÙ$a679bddc-d506-11ea-143a-6d4dcd70e918²upstream_cells_mapƒ³Markdown.Admonition�«Markdown.MD�¨Markdown�Ù$76c11174-d474-11ea-29c5-81856d47cf74„´precedence_heuristic §cell_idÙ$76c11174-d474-11ea-29c5-81856d47cf74´downstream_cells_map�¦medium�²upstream_cells_map‚¤area‘Ù$cb36a9ee-d472-11ea-1835-bf7963137e18¡/�Ù$f5f89724-d507-11ea-0a93-6d904f36bbe4„´precedence_heuristic §cell_idÙ$f5f89724-d507-11ea-0a93-6d904f36bbe4´downstream_cells_map�¦pieces‘Ù$e80986c6-d509-11ea-12e3-f79a54b5ab31²upstream_cells_map€Ù$97bfd13c-dcc2-11ea-0067-ad8c2c6517fc„´precedence_heuristic §cell_idÙ$97bfd13c-dcc2-11ea-0067-ad8c2c6517fc´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$48647ab2-daa5-11ea-0494-ef87be7cbf7c„´precedence_heuristic §cell_idÙ$48647ab2-daa5-11ea-0494-ef87be7cbf7c´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¤hint‘Ù$b8644fb0-daa6-11ea-1e94-9bf46e7b0fad¨getindex�Ù$5a6d1a8e-dcbc-11ea-272a-6f769c8d309c„´precedence_heuristic §cell_idÙ$5a6d1a8e-dcbc-11ea-272a-6f769c8d309c´downstream_cells_map�§correct™Ù$33b1975c-d45c-11ea-035f-ab76e46a31edÙ$f26d50da-d46b-11ea-0c2d-77ca13532b3dÙ$5c4a5f22-d471-11ea-260f-9338d8bfa2d6Ù$a07e5c3e-d476-11ea-308c-718f8f128334Ù$1ba2c208-d4ff-11ea-0a8e-e75bf7e1c3e6Ù$6ae748b2-d503-11ea-1c51-6b2df24fd212Ù$a679bddc-d506-11ea-143a-6d4dcd70e918Ù$5df7eefc-d507-11ea-0d1f-45b224a04774Ù$e80986c6-d509-11ea-12e3-f79a54b5ab31²upstream_cells_map…§@md_str�³Markdown.Admonition�«Markdown.MD�¨Markdown�¨getindex�Ù$a679bddc-d506-11ea-143a-6d4dcd70e918„´precedence_heuristic §cell_idÙ$a679bddc-d506-11ea-143a-6d4dcd70e918´downstream_cells_map€²upstream_cells_map‡§@md_str�¥cuts3‘Ù$a05aae8e-d506-11ea-190f-57e9ce53b8b9§correct‘Ù$5a6d1a8e-dcbc-11ea-272a-6f769c8d309c¤hint‘Ù$b8644fb0-daa6-11ea-1e94-9bf46e7b0fad¢==�¦almost‘Ù$4119d19e-dcbc-11ea-3ec8-271e88e1afca¨getindex�Ù$a07e5c3e-d476-11ea-308c-718f8f128334„´precedence_heuristic §cell_idÙ$a07e5c3e-d476-11ea-308c-718f8f128334´downstream_cells_map€²upstream_cells_map‹§@md_str�¡r‘Ù$3c12f2b4-d471-11ea-2d37-539f061f7cf2¢pi�¢A2‘Ù$04b010c0-d473-11ea-1767-136c7e26e122§correct‘Ù$5a6d1a8e-dcbc-11ea-272a-6f769c8d309c¡^�¤hint‘Ù$b8644fb0-daa6-11ea-1e94-9bf46e7b0fad¢!=�¡*�¢==�¨getindex�Ù$14158eb0-d45c-11ea-088f-330e45412320„´precedence_heuristic §cell_idÙ$14158eb0-d45c-11ea-088f-330e45412320´downstream_cells_map�¡a’Ù$03664f5c-d45c-11ea-21b6-91cd647a07aaÙ$33b1975c-d45c-11ea-035f-ab76e46a31ed²upstream_cells_map€Ù$20a1e9cc-d500-11ea-3d9b-279c71bc20f1„´precedence_heuristic §cell_idÙ$20a1e9cc-d500-11ea-3d9b-279c71bc20f1´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$e80986c6-d509-11ea-12e3-f79a54b5ab31„´precedence_heuristic §cell_idÙ$e80986c6-d509-11ea-12e3-f79a54b5ab31´downstream_cells_map€²upstream_cells_map‹¨getindex�§@md_str�¦pieces‘Ù$f5f89724-d507-11ea-0a93-6d904f36bbe4§correct‘Ù$5a6d1a8e-dcbc-11ea-272a-6f769c8d309c¬keep_working‘Ù$921bba30-dcbc-11ea-13c3-87554722da8a¡/�£Int�¡+�¡*�¢==�¡n‘Ù$bd9f3d24-d509-11ea-165d-3d465a0b4542Ù$bd9f3d24-d509-11ea-165d-3d465a0b4542„´precedence_heuristic §cell_idÙ$bd9f3d24-d509-11ea-165d-3d465a0b4542´downstream_cells_map�¡n‘Ù$e80986c6-d509-11ea-12e3-f79a54b5ab31²upstream_cells_mapЧ@md_str�­Base.getindex�¤Base�´PlutoRunner.Base.get�©@html_str�Ù#PlutoRunner.PlutoRunner.create_bond�«PlutoRunner�®Base.Docs.HTML�¥@bind�»PlutoRunner.Core.applicable�Ù$6ae748b2-d503-11ea-1c51-6b2df24fd212„´precedence_heuristic §cell_idÙ$6ae748b2-d503-11ea-1c51-6b2df24fd212´downstream_cells_map€²upstream_cells_map‡§@md_str�¥cuts2‘Ù$6494e270-d503-11ea-38a7-df96e7f0a241§correct‘Ù$5a6d1a8e-dcbc-11ea-272a-6f769c8d309c¤hint‘Ù$b8644fb0-daa6-11ea-1e94-9bf46e7b0fad¢!=�¢==�¨getindex�Ù$04b010c0-d473-11ea-1767-136c7e26e122„´precedence_heuristic §cell_idÙ$04b010c0-d473-11ea-1767-136c7e26e122´downstream_cells_map�¢A2‘Ù$a07e5c3e-d476-11ea-308c-718f8f128334²upstream_cells_map‚¤area‘Ù$cb36a9ee-d472-11ea-1835-bf7963137e18¡r‘Ù$3c12f2b4-d471-11ea-2d37-539f061f7cf2Ù$d9c31dfa-d470-11ea-23b2-838975b71f7c„´precedence_heuristic §cell_idÙ$d9c31dfa-d470-11ea-23b2-838975b71f7c´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¡r‘Ù$3c12f2b4-d471-11ea-2d37-539f061f7cf2¨getindex�Ù$962e6b86-d474-11ea-11a6-a1d11e33ae42„´precedence_heuristic §cell_idÙ$962e6b86-d474-11ea-11a6-a1d11e33ae42´downstream_cells_map�¢xl‘Ù$1ba2c208-d4ff-11ea-0a8e-e75bf7e1c3e6²upstream_cells_map‚¤area‘Ù$cb36a9ee-d472-11ea-1835-bf7963137e18¡/�Ù$03249876-d508-11ea-16bb-fd5afed37a1f„´precedence_heuristic §cell_idÙ$03249876-d508-11ea-16bb-fd5afed37a1f´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$2814a1d4-dcc0-11ea-3d42-f52765e478fe„´precedence_heuristic §cell_idÙ$2814a1d4-dcc0-11ea-3d42-f52765e478fe´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¤hint‘Ù$b8644fb0-daa6-11ea-1e94-9bf46e7b0fad¨getindex�Ù$8b12d200-d474-11ea-3035-01eccf39f917„´precedence_heuristic §cell_idÙ$8b12d200-d474-11ea-3035-01eccf39f917´downstream_cells_map�¥large�²upstream_cells_map‚¤area‘Ù$cb36a9ee-d472-11ea-1835-bf7963137e18¡/�Ù$6494e270-d503-11ea-38a7-df96e7f0a241„´precedence_heuristic §cell_idÙ$6494e270-d503-11ea-38a7-df96e7f0a241´downstream_cells_map�¥cuts2‘Ù$6ae748b2-d503-11ea-1c51-6b2df24fd212²upstream_cells_map€Ù$f147b6cc-d4ff-11ea-05ad-6f5b441e5d1b„´precedence_heuristic §cell_idÙ$f147b6cc-d4ff-11ea-05ad-6f5b441e5d1b´downstream_cells_map�¯two_medium_cost�²upstream_cells_map‚¡-�¡*�Ù$33b1975c-d45c-11ea-035f-ab76e46a31ed„´precedence_heuristic §cell_idÙ$33b1975c-d45c-11ea-035f-ab76e46a31ed´downstream_cells_map€²upstream_cells_mapЧ@md_str�§correct‘Ù$5a6d1a8e-dcbc-11ea-272a-6f769c8d309c¡c‘Ù$30f0f882-d45c-11ea-2adc-7d84ecf8a7a6¬keep_working‘Ù$921bba30-dcbc-11ea-13c3-87554722da8a¡b‘Ù$2ed4bb92-d45c-11ea-0b31-2d8e32ce7b44¡+�¡*�¢==�¡a‘Ù$14158eb0-d45c-11ea-088f-330e45412320¨getindex�Ù$1ba2c208-d4ff-11ea-0a8e-e75bf7e1c3e6„´precedence_heuristic §cell_idÙ$1ba2c208-d4ff-11ea-0a8e-e75bf7e1c3e6´downstream_cells_map€²upstream_cells_mapˆ§@md_str�¨getindex�¨isapprox�¢xl‘Ù$962e6b86-d474-11ea-11a6-a1d11e33ae42§correct‘Ù$5a6d1a8e-dcbc-11ea-272a-6f769c8d309c¡!�¤hint‘Ù$b8644fb0-daa6-11ea-1e94-9bf46e7b0fadªbest_value‘Ù$16ec3f32-d4ff-11ea-20e2-5bc6dd5db083Ù$a42e4eb0-d474-11ea-316a-3d864451bc01„´precedence_heuristic §cell_idÙ$a42e4eb0-d474-11ea-316a-3d864451bc01´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$e0cb2822-dcc2-11ea-2c85-5748bfe526dc„´precedence_heuristic §cell_idÙ$e0cb2822-dcc2-11ea-2c85-5748bfe526dc´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$2eb9a560-d507-11ea-3b8b-9d06678fe131„´precedence_heuristic §cell_idÙ$2eb9a560-d507-11ea-3b8b-9d06678fe131´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$50f0f6d6-d471-11ea-304e-8f72e7ef9d7e„´precedence_heuristic §cell_idÙ$50f0f6d6-d471-11ea-304e-8f72e7ef9d7e´downstream_cells_map�¡A‘Ù$5c4a5f22-d471-11ea-260f-9338d8bfa2d6²upstream_cells_map‚¡^�¡r‘Ù$3c12f2b4-d471-11ea-2d37-539f061f7cf2Ù$3da812c6-d460-11ea-0170-79fbb6a4347c„´precedence_heuristic §cell_idÙ$3da812c6-d460-11ea-0170-79fbb6a4347c´downstream_cells_map�¦slices’Ù$a38cb92e-d45e-11ea-2959-05be909befb2Ù$f26d50da-d46b-11ea-0c2d-77ca13532b3d²upstream_cells_map€Ù$5b07b8fe-d475-11ea-01aa-6b88d6ed8a05„´precedence_heuristic §cell_idÙ$5b07b8fe-d475-11ea-01aa-6b88d6ed8a05´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$30f0f882-d45c-11ea-2adc-7d84ecf8a7a6„´precedence_heuristic §cell_idÙ$30f0f882-d45c-11ea-2adc-7d84ecf8a7a6´downstream_cells_map�¡c‘Ù$33b1975c-d45c-11ea-035f-ab76e46a31ed²upstream_cells_map€Ù$f26d50da-d46b-11ea-0c2d-77ca13532b3d„´precedence_heuristic §cell_idÙ$f26d50da-d46b-11ea-0c2d-77ca13532b3d´downstream_cells_map€²upstream_cells_map�§@md_str�¤ceil�¦people‘Ù$262b312a-d460-11ea-26c5-df30459effc5¦pizzas‘Ù$444e2fa4-d460-11ea-12aa-57e0576c2d66¦slices‘Ù$3da812c6-d460-11ea-0170-79fbb6a4347c§correct‘Ù$5a6d1a8e-dcbc-11ea-272a-6f769c8d309c£avg‘Ù$2ea7f162-d460-11ea-0e8e-25340e2e64da¬keep_working‘Ù$921bba30-dcbc-11ea-13c3-87554722da8a¡/�¡*�¢==�¦almost‘Ù$4119d19e-dcbc-11ea-3ec8-271e88e1afca¨getindex�Ù$16ec3f32-d4ff-11ea-20e2-5bc6dd5db083„´precedence_heuristic §cell_idÙ$16ec3f32-d4ff-11ea-20e2-5bc6dd5db083´downstream_cells_map�ªbest_value‘Ù$1ba2c208-d4ff-11ea-0a8e-e75bf7e1c3e6²upstream_cells_map�¥small‘Ù$3823d09e-d474-11ea-194e-59b5805f303bÙ$d1e3dec0-d507-11ea-1213-d37a9325ee2f„´precedence_heuristic §cell_idÙ$d1e3dec0-d507-11ea-1213-d37a9325ee2f´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$57f024ae-d500-11ea-1cc4-ed28348fdf93„´precedence_heuristic §cell_idÙ$57f024ae-d500-11ea-1cc4-ed28348fdf93´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$180c8fdc-d503-11ea-04ca-bf2c07fd1c17„´precedence_heuristic §cell_idÙ$180c8fdc-d503-11ea-04ca-bf2c07fd1c17´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$444e2fa4-d460-11ea-12aa-57e0576c2d66„´precedence_heuristic §cell_idÙ$444e2fa4-d460-11ea-12aa-57e0576c2d66´downstream_cells_map�¦pizzas‘Ù$f26d50da-d46b-11ea-0c2d-77ca13532b3d²upstream_cells_map€Ù$03664f5c-d45c-11ea-21b6-91cd647a07aa„´precedence_heuristic §cell_idÙ$03664f5c-d45c-11ea-21b6-91cd647a07aa´downstream_cells_map€²upstream_cells_map„§@md_str�¡b‘Ù$2ed4bb92-d45c-11ea-0b31-2d8e32ce7b44¡a‘Ù$14158eb0-d45c-11ea-088f-330e45412320¨getindex�Ù$3823d09e-d474-11ea-194e-59b5805f303b„´precedence_heuristic §cell_idÙ$3823d09e-d474-11ea-194e-59b5805f303b´downstream_cells_map�¥small‘Ù$16ec3f32-d4ff-11ea-20e2-5bc6dd5db083²upstream_cells_map‚¤area‘Ù$cb36a9ee-d472-11ea-1835-bf7963137e18¡/�Ù$262b312a-d460-11ea-26c5-df30459effc5„´precedence_heuristic §cell_idÙ$262b312a-d460-11ea-26c5-df30459effc5´downstream_cells_map�¦people’Ù$a38cb92e-d45e-11ea-2959-05be909befb2Ù$f26d50da-d46b-11ea-0c2d-77ca13532b3d²upstream_cells_map€Ù$a05aae8e-d506-11ea-190f-57e9ce53b8b9„´precedence_heuristic §cell_idÙ$a05aae8e-d506-11ea-190f-57e9ce53b8b9´downstream_cells_map�¥cuts3‘Ù$a679bddc-d506-11ea-143a-6d4dcd70e918²upstream_cells_map€Ù$a38cb92e-d45e-11ea-2959-05be909befb2„´precedence_heuristic §cell_idÙ$a38cb92e-d45e-11ea-2959-05be909befb2´downstream_cells_map€²upstream_cells_map…§@md_str�¦slices‘Ù$3da812c6-d460-11ea-0170-79fbb6a4347c£avg‘Ù$2ea7f162-d460-11ea-0e8e-25340e2e64da¦people‘Ù$262b312a-d460-11ea-26c5-df30459effc5¨getindex�Ù$19eb2a82-d500-11ea-3782-596adc689382„´precedence_heuristic §cell_idÙ$19eb2a82-d500-11ea-3782-596adc689382´downstream_cells_map�¯two_medium_area�²upstream_cells_map‚¤area‘Ù$cb36a9ee-d472-11ea-1835-bf7963137e18¡*�Ù$8700d986-d475-11ea-0d0e-790448cf92ba„´precedence_heuristic §cell_idÙ$8700d986-d475-11ea-0d0e-790448cf92ba´downstream_cells_map€²upstream_cells_map�§@md_str�¬smalls_in_xl‘Ù$637c26fa-d475-11ea-2c5b-2b0f4775b119¡>�¦isless�¢pi�£eps�¡<�¡-�¡/�¡^�¡+�¤hint‘Ù$b8644fb0-daa6-11ea-1e94-9bf46e7b0fad¡*�¢==�¨getindex�Ù$4dff4b5e-d461-11ea-29c8-d548fdb5f08b„´precedence_heuristic §cell_idÙ$4dff4b5e-d461-11ea-29c8-d548fdb5f08b´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$637c26fa-d475-11ea-2c5b-2b0f4775b119„´precedence_heuristic §cell_idÙ$637c26fa-d475-11ea-2c5b-2b0f4775b119´downstream_cells_map�¬smalls_in_xl‘Ù$8700d986-d475-11ea-0d0e-790448cf92ba²upstream_cells_map€Ù$bae0cb62-dcc2-11ea-0667-512e1c407d40„´precedence_heuristic §cell_idÙ$bae0cb62-dcc2-11ea-0667-512e1c407d40´downstream_cells_map�¥cuts5‘Ù$8cada086-daa5-11ea-220c-0f660938b604²upstream_cells_map€Ù$0d76d97c-d500-11ea-2433-e96c6fc43b05„´precedence_heuristic §cell_idÙ$0d76d97c-d500-11ea-2433-e96c6fc43b05´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$92b4a012-d503-11ea-15a2-1f3a446d3284„´precedence_heuristic §cell_idÙ$92b4a012-d503-11ea-15a2-1f3a446d3284´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$3c12f2b4-d471-11ea-2d37-539f061f7cf2„´precedence_heuristic §cell_idÙ$3c12f2b4-d471-11ea-2d37-539f061f7cf2´downstream_cells_map�¡r•Ù$d9c31dfa-d470-11ea-23b2-838975b71f7cÙ$50f0f6d6-d471-11ea-304e-8f72e7ef9d7eÙ$5c4a5f22-d471-11ea-260f-9338d8bfa2d6Ù$04b010c0-d473-11ea-1767-136c7e26e122Ù$a07e5c3e-d476-11ea-308c-718f8f128334²upstream_cells_map€Ù$2ed4bb92-d45c-11ea-0b31-2d8e32ce7b44„´precedence_heuristic §cell_idÙ$2ed4bb92-d45c-11ea-0b31-2d8e32ce7b44´downstream_cells_map�¡b’Ù$03664f5c-d45c-11ea-21b6-91cd647a07aaÙ$33b1975c-d45c-11ea-035f-ab76e46a31ed²upstream_cells_map€Ù$5a8ede88-d507-11ea-30d9-c99a67243781„´precedence_heuristic §cell_idÙ$5a8ede88-d507-11ea-30d9-c99a67243781´downstream_cells_map�¥cuts4‘Ù$5df7eefc-d507-11ea-0d1f-45b224a04774²upstream_cells_map€Ù$5df7eefc-d507-11ea-0d1f-45b224a04774„´precedence_heuristic §cell_idÙ$5df7eefc-d507-11ea-0d1f-45b224a04774´downstream_cells_map€²upstream_cells_mapˆ§@md_str�¡<�§correct‘Ù$5a6d1a8e-dcbc-11ea-272a-6f769c8d309c¦isless�¤hint‘Ù$b8644fb0-daa6-11ea-1e94-9bf46e7b0fad¢==�¥cuts4‘Ù$5a8ede88-d507-11ea-30d9-c99a67243781¨getindex�Ù$b8644fb0-daa6-11ea-1e94-9bf46e7b0fad„´precedence_heuristic §cell_idÙ$b8644fb0-daa6-11ea-1e94-9bf46e7b0fad´downstream_cells_map�¤hint™Ù$a07e5c3e-d476-11ea-308c-718f8f128334Ù$8700d986-d475-11ea-0d0e-790448cf92baÙ$1ba2c208-d4ff-11ea-0a8e-e75bf7e1c3e6Ù$6ae748b2-d503-11ea-1c51-6b2df24fd212Ù$a679bddc-d506-11ea-143a-6d4dcd70e918Ù$5df7eefc-d507-11ea-0d1f-45b224a04774Ù$2814a1d4-dcc0-11ea-3d42-f52765e478feÙ$48647ab2-daa5-11ea-0494-ef87be7cbf7cÙ$8cada086-daa5-11ea-220c-0f660938b604²upstream_cells_mapƒ³Markdown.Admonition�«Markdown.MD�¨Markdown�´cell_execution_orderÜ@Ù$14158eb0-d45c-11ea-088f-330e45412320Ù$2ed4bb92-d45c-11ea-0b31-2d8e32ce7b44Ù$03664f5c-d45c-11ea-21b6-91cd647a07aaÙ$e5e0a0da-d45c-11ea-1042-e9b5d0654d4fÙ$30f0f882-d45c-11ea-2adc-7d84ecf8a7a6Ù$262b312a-d460-11ea-26c5-df30459effc5Ù$2ea7f162-d460-11ea-0e8e-25340e2e64daÙ$3da812c6-d460-11ea-0170-79fbb6a4347cÙ$a38cb92e-d45e-11ea-2959-05be909befb2Ù$4dff4b5e-d461-11ea-29c8-d548fdb5f08bÙ$444e2fa4-d460-11ea-12aa-57e0576c2d66Ù$3c12f2b4-d471-11ea-2d37-539f061f7cf2Ù$d9c31dfa-d470-11ea-23b2-838975b71f7cÙ$50f0f6d6-d471-11ea-304e-8f72e7ef9d7eÙ$f907e46a-d471-11ea-07e5-f30e2aab3d08Ù$cb36a9ee-d472-11ea-1835-bf7963137e18Ù$d9575e9c-d472-11ea-1eda-2d335d039f28Ù$04b010c0-d473-11ea-1767-136c7e26e122Ù$edb95b14-d473-11ea-3a5a-77382d31f941Ù$637c26fa-d475-11ea-2c5b-2b0f4775b119Ù$5b07b8fe-d475-11ea-01aa-6b88d6ed8a05Ù$3823d09e-d474-11ea-194e-59b5805f303bÙ$76c11174-d474-11ea-29c5-81856d47cf74Ù$8b12d200-d474-11ea-3035-01eccf39f917Ù$962e6b86-d474-11ea-11a6-a1d11e33ae42Ù$a42e4eb0-d474-11ea-316a-3d864451bc01Ù$16ec3f32-d4ff-11ea-20e2-5bc6dd5db083Ù$cb419286-d4ff-11ea-1d7f-af5c8574b775Ù$f147b6cc-d4ff-11ea-05ad-6f5b441e5d1bÙ$0d76d97c-d500-11ea-2433-e96c6fc43b05Ù$19eb2a82-d500-11ea-3782-596adc689382Ù$20a1e9cc-d500-11ea-3d9b-279c71bc20f1Ù$70e85498-d500-11ea-35af-474574f5c011Ù$57f024ae-d500-11ea-1cc4-ed28348fdf93Ù$180c8fdc-d503-11ea-04ca-bf2c07fd1c17Ù$6494e270-d503-11ea-38a7-df96e7f0a241Ù$92b4a012-d503-11ea-15a2-1f3a446d3284Ù$a05aae8e-d506-11ea-190f-57e9ce53b8b9Ù$2eb9a560-d507-11ea-3b8b-9d06678fe131Ù$5a8ede88-d507-11ea-30d9-c99a67243781Ù$d1e3dec0-d507-11ea-1213-d37a9325ee2fÙ$97bfd13c-dcc2-11ea-0067-ad8c2c6517fcÙ$bae0cb62-dcc2-11ea-0667-512e1c407d40Ù$e0cb2822-dcc2-11ea-2c85-5748bfe526dcÙ$f5f89724-d507-11ea-0a93-6d904f36bbe4Ù$03249876-d508-11ea-16bb-fd5afed37a1fÙ$bd9f3d24-d509-11ea-165d-3d465a0b4542Ù$b8644fb0-daa6-11ea-1e94-9bf46e7b0fadÙ$8700d986-d475-11ea-0d0e-790448cf92baÙ$2814a1d4-dcc0-11ea-3d42-f52765e478feÙ$48647ab2-daa5-11ea-0494-ef87be7cbf7cÙ$8cada086-daa5-11ea-220c-0f660938b604Ù$4119d19e-dcbc-11ea-3ec8-271e88e1afcaÙ$921bba30-dcbc-11ea-13c3-87554722da8aÙ$5a6d1a8e-dcbc-11ea-272a-6f769c8d309cÙ$33b1975c-d45c-11ea-035f-ab76e46a31edÙ$f26d50da-d46b-11ea-0c2d-77ca13532b3dÙ$5c4a5f22-d471-11ea-260f-9338d8bfa2d6Ù$a07e5c3e-d476-11ea-308c-718f8f128334Ù$1ba2c208-d4ff-11ea-0a8e-e75bf7e1c3e6Ù$6ae748b2-d503-11ea-1c51-6b2df24fd212Ù$a679bddc-d506-11ea-143a-6d4dcd70e918Ù$5df7eefc-d507-11ea-0d1f-45b224a04774Ù$e80986c6-d509-11ea-12e3-f79a54b5ab31´last_hot_reload_timeË©shortpath´Basic mathematics.jl®process_status¥ready¤pathÙM/home/fons/featured-slider-server/featured_fix/src/basic/Basic mathematics.jl­pluto_version¦v1.0.0®last_save_timeËAÚ­†—Ý©]ªcell_orderÜ@Ù$03664f5c-d45c-11ea-21b6-91cd647a07aaÙ$14158eb0-d45c-11ea-088f-330e45412320Ù$2ed4bb92-d45c-11ea-0b31-2d8e32ce7b44Ù$e5e0a0da-d45c-11ea-1042-e9b5d0654d4fÙ$30f0f882-d45c-11ea-2adc-7d84ecf8a7a6Ù$33b1975c-d45c-11ea-035f-ab76e46a31edÙ$a38cb92e-d45e-11ea-2959-05be909befb2Ù$262b312a-d460-11ea-26c5-df30459effc5Ù$2ea7f162-d460-11ea-0e8e-25340e2e64daÙ$3da812c6-d460-11ea-0170-79fbb6a4347cÙ$4dff4b5e-d461-11ea-29c8-d548fdb5f08bÙ$444e2fa4-d460-11ea-12aa-57e0576c2d66Ù$f26d50da-d46b-11ea-0c2d-77ca13532b3dÙ$d9c31dfa-d470-11ea-23b2-838975b71f7cÙ$3c12f2b4-d471-11ea-2d37-539f061f7cf2Ù$50f0f6d6-d471-11ea-304e-8f72e7ef9d7eÙ$5c4a5f22-d471-11ea-260f-9338d8bfa2d6Ù$f907e46a-d471-11ea-07e5-f30e2aab3d08Ù$cb36a9ee-d472-11ea-1835-bf7963137e18Ù$d9575e9c-d472-11ea-1eda-2d335d039f28Ù$04b010c0-d473-11ea-1767-136c7e26e122Ù$a07e5c3e-d476-11ea-308c-718f8f128334Ù$edb95b14-d473-11ea-3a5a-77382d31f941Ù$637c26fa-d475-11ea-2c5b-2b0f4775b119Ù$8700d986-d475-11ea-0d0e-790448cf92baÙ$5b07b8fe-d475-11ea-01aa-6b88d6ed8a05Ù$3823d09e-d474-11ea-194e-59b5805f303bÙ$76c11174-d474-11ea-29c5-81856d47cf74Ù$8b12d200-d474-11ea-3035-01eccf39f917Ù$962e6b86-d474-11ea-11a6-a1d11e33ae42Ù$a42e4eb0-d474-11ea-316a-3d864451bc01Ù$16ec3f32-d4ff-11ea-20e2-5bc6dd5db083Ù$1ba2c208-d4ff-11ea-0a8e-e75bf7e1c3e6Ù$cb419286-d4ff-11ea-1d7f-af5c8574b775Ù$f147b6cc-d4ff-11ea-05ad-6f5b441e5d1bÙ$0d76d97c-d500-11ea-2433-e96c6fc43b05Ù$19eb2a82-d500-11ea-3782-596adc689382Ù$20a1e9cc-d500-11ea-3d9b-279c71bc20f1Ù$70e85498-d500-11ea-35af-474574f5c011Ù$57f024ae-d500-11ea-1cc4-ed28348fdf93Ù$180c8fdc-d503-11ea-04ca-bf2c07fd1c17Ù$6494e270-d503-11ea-38a7-df96e7f0a241Ù$6ae748b2-d503-11ea-1c51-6b2df24fd212Ù$92b4a012-d503-11ea-15a2-1f3a446d3284Ù$a05aae8e-d506-11ea-190f-57e9ce53b8b9Ù$a679bddc-d506-11ea-143a-6d4dcd70e918Ù$2eb9a560-d507-11ea-3b8b-9d06678fe131Ù$5a8ede88-d507-11ea-30d9-c99a67243781Ù$5df7eefc-d507-11ea-0d1f-45b224a04774Ù$d1e3dec0-d507-11ea-1213-d37a9325ee2fÙ$2814a1d4-dcc0-11ea-3d42-f52765e478feÙ$48647ab2-daa5-11ea-0494-ef87be7cbf7cÙ$97bfd13c-dcc2-11ea-0067-ad8c2c6517fcÙ$bae0cb62-dcc2-11ea-0667-512e1c407d40Ù$8cada086-daa5-11ea-220c-0f660938b604Ù$e0cb2822-dcc2-11ea-2c85-5748bfe526dcÙ$f5f89724-d507-11ea-0a93-6d904f36bbe4Ù$03249876-d508-11ea-16bb-fd5afed37a1fÙ$bd9f3d24-d509-11ea-165d-3d465a0b4542Ù$e80986c6-d509-11ea-12e3-f79a54b5ab31Ù$b8644fb0-daa6-11ea-1e94-9bf46e7b0fadÙ$4119d19e-dcbc-11ea-3ec8-271e88e1afcaÙ$921bba30-dcbc-11ea-13c3-87554722da8aÙ$5a6d1a8e-dcbc-11ea-272a-6f769c8d309c­julia_version§v1.12.4±published_objects€¥nbpkgНinstall_time_nsΪߜu¬instantiatedòinstalled_versions‚Ù!__internal_julia_manifest_version¦1.12.4¸__internal_julia_version¦1.12.4°terminal_outputs�ªnbpkg_syncÚp Waiting for other notebooks to finish Pkg operations... === Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_bpcjiyurbm/Project.toml`  Manifest No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_bpcjiyurbm/Manifest.toml` Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...§enabled÷restart_recommended_msgÀ´restart_required_msgÀ­busy_packages�¶waiting_for_permissionÂÙ,waiting_for_permission_but_probably_disabled«cell_inputsÞ@Ù$921bba30-dcbc-11ea-13c3-87554722da8a„§cell_idÙ$921bba30-dcbc-11ea-13c3-87554722da8a¤codeÙ‚keep_working(text=md"The answer is not quite right.") = Markdown.MD(Markdown.Admonition("danger", "Keep working on it!", [text]));¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$5c4a5f22-d471-11ea-260f-9338d8bfa2d6„§cell_idÙ$5c4a5f22-d471-11ea-260f-9338d8bfa2d6¤codeÙ×if A != pi * r^2 keep_working(md"Let's fix the above cell before we move on! Find the formula to calculate the area using **pi** and **r**.") else correct(md"""**Great!** You figured it out. Keep going.""") end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$8cada086-daa5-11ea-220c-0f660938b604„§cell_idÙ$8cada086-daa5-11ea-220c-0f660938b604¤codeÚ"if cuts5 == 5 + 4 + 3 + 2 + 1 + 1 hint(md"To get the maximum number of pieces with 5 cuts it will be ``5 + 4 + 3 + 2 + 1``, plus 1 extra for the original pizza with 0 cuts. To find the formula of a sequence of numbers group them like so: ``5 + (4 + 1) + (3 + 2) = 3 * 5``.") else md"" end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$f907e46a-d471-11ea-07e5-f30e2aab3d08„§cell_idÙ$f907e46a-d471-11ea-07e5-f30e2aab3d08¤codeÙñmd"""The diameter of a pizza is often stated on a menu so let's define a **formula** to calculate the area of a pizza given the diameter **d**. We do this by writing a formula like this: `area(d) = pi * (d/2)^2` Let's write that below: """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$edb95b14-d473-11ea-3a5a-77382d31f941„§cell_idÙ$edb95b14-d473-11ea-3a5a-77382d31f941¤codeÚÍmd"""## Finding the best pizza deal Let's see if a larger pizza is a better value by calculating the price per area. There are 4 sizes: small, medium, large, extra large with the following prices: Size | Diameter (inches) | Price ($) :------- | :---------------: | --------: small | 9 | 13.10 medium | 13 | 20.95 large | 15 | 24.90 XL | 17 | 30.95 ### 1. How many small pizzas is the same as one XL pizza? Edit the expression below: """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$70e85498-d500-11ea-35af-474574f5c011„§cell_idÙ$70e85498-d500-11ea-35af-474574f5c011¤code³two_medium_deal = 1¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$e5e0a0da-d45c-11ea-1042-e9b5d0654d4f„§cell_idÙ$e5e0a0da-d45c-11ea-1042-e9b5d0654d4f¤codeÙ5md"Fix the value of `c` below to make it `c = a * b`"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$cb419286-d4ff-11ea-1d7f-af5c8574b775„§cell_idÙ$cb419286-d4ff-11ea-1d7f-af5c8574b775¤codeÙämd"""### 3. Is this a good deal? San Marinos has a special **\"Buy two medium pizzas and save \$5\"**. Is this a better deal than buying a extra-large pizza? Calculate the total cost of two medium pizzas deal (saving \$5):"""¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$2ea7f162-d460-11ea-0e8e-25340e2e64da„§cell_idÙ$2ea7f162-d460-11ea-0e8e-25340e2e64da¤code©avg = 2.5¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$d9575e9c-d472-11ea-1eda-2d335d039f28„§cell_idÙ$d9575e9c-d472-11ea-1eda-2d335d039f28¤codeÙÚmd"""Now we have a function called **area** that we can pass any diameter and it will return the area of a pizza (or circle), let's try that with the pizza from before with `area(2*r)` to get the area of the pizza: """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$cb36a9ee-d472-11ea-1835-bf7963137e18„§cell_idÙ$cb36a9ee-d472-11ea-1835-bf7963137e18¤code¸area(d) = pi * (d / 2)^2¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$4119d19e-dcbc-11ea-3ec8-271e88e1afca„§cell_idÙ$4119d19e-dcbc-11ea-3ec8-271e88e1afca¤codeÙTalmost(text) = Markdown.MD(Markdown.Admonition("warning", "Almost there!", [text]));¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$76c11174-d474-11ea-29c5-81856d47cf74„§cell_idÙ$76c11174-d474-11ea-29c5-81856d47cf74¤code¹medium = 20.95 / area(13)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$f5f89724-d507-11ea-0a93-6d904f36bbe4„§cell_idÙ$f5f89724-d507-11ea-0a93-6d904f36bbe4¤codeÙ function pieces(n) return n end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$97bfd13c-dcc2-11ea-0067-ad8c2c6517fc„§cell_idÙ$97bfd13c-dcc2-11ea-0067-ad8c2c6517fc¤codeÙPmd"To get an extra hint, figure out how many slices we can get from **5 cuts**:"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$48647ab2-daa5-11ea-0494-ef87be7cbf7c„§cell_idÙ$48647ab2-daa5-11ea-0494-ef87be7cbf7c¤codeÙfhint(md"A new cut will create the maximum number of _new slices_ if it intersects all previous cuts.")¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$5a6d1a8e-dcbc-11ea-272a-6f769c8d309c„§cell_idÙ$5a6d1a8e-dcbc-11ea-272a-6f769c8d309c¤codeÙ—correct(text=md"Great! You got the right answer! Let's move on to the next section.") = Markdown.MD(Markdown.Admonition("correct", "Got it!", [text]));¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$a679bddc-d506-11ea-143a-6d4dcd70e918„§cell_idÙ$a679bddc-d506-11ea-143a-6d4dcd70e918¤codeÙúif cuts3 == 6 almost(md"""Close but not quite. Who said that pizza slices need to look like pizza slices?""") elseif cuts3 == 7 correct(md"You got it right. Now for something harder...") else hint(md"Try drawing it out on a piece of paper.") end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$a07e5c3e-d476-11ea-308c-718f8f128334„§cell_idÙ$a07e5c3e-d476-11ea-308c-718f8f128334¤codeÙ¨if A2 != pi * r^2 hint(md"Keep trying to get the right answer. **Hint**: you need to multiply the radius by 2 to convert it into the diameter.") else correct() end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$14158eb0-d45c-11ea-088f-330e45412320„§cell_idÙ$14158eb0-d45c-11ea-088f-330e45412320¤code¥a = 2¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$20a1e9cc-d500-11ea-3d9b-279c71bc20f1„§cell_idÙ$20a1e9cc-d500-11ea-3d9b-279c71bc20f1¤codeÙkmd"Now calculate cost per area by taking the total cost of two medium pizzas and divide by the total area:"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$e80986c6-d509-11ea-12e3-f79a54b5ab31„§cell_idÙ$e80986c6-d509-11ea-12e3-f79a54b5ab31¤codeÚ#if pieces(n) == n * (n + 1) / 2 + 1 md"""_Testing..._ **For $n cuts, you predict $(pieces(n)) pieces.** $(correct(md"Well done!"))""" else md"""_Testing..._ **For $n cuts, you predict $(pieces(n)) pieces.** $(keep_working(md"The answer should be $(Int(n*(n+1)/2+1))."))""" end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$bd9f3d24-d509-11ea-165d-3d465a0b4542„§cell_idÙ$bd9f3d24-d509-11ea-165d-3d465a0b4542¤codeÙbmd"""Move the slider to change the number of cuts: $(@bind n html"")"""¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$6ae748b2-d503-11ea-1c51-6b2df24fd212„§cell_idÙ$6ae748b2-d503-11ea-1c51-6b2df24fd212¤codeÙhif cuts2 != 4 hint(md"The cuts must go all the way across the pizza!") else correct(md"Awesome!") end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$04b010c0-d473-11ea-1767-136c7e26e122„§cell_idÙ$04b010c0-d473-11ea-1767-136c7e26e122¤code¬A2 = area(r)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$d9c31dfa-d470-11ea-23b2-838975b71f7c„§cell_idÙ$d9c31dfa-d470-11ea-23b2-838975b71f7c¤codeÙúmd"""## Writing your own math functions The area of a pizza is ``A = \pi r^2``. Lets try calculating the area of a pizza that has a radius of $r inches (**r = $r**). Type **pi** to get the value of ``\pi`` and **r^2** to get the radius squared. """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$962e6b86-d474-11ea-11a6-a1d11e33ae42„§cell_idÙ$962e6b86-d474-11ea-11a6-a1d11e33ae42¤codeµxl = 30.95 / area(17)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$03249876-d508-11ea-16bb-fd5afed37a1f„§cell_idÙ$03249876-d508-11ea-16bb-fd5afed37a1f¤codeÙ&md"""##### Let's test your formula!"""¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$2814a1d4-dcc0-11ea-3d42-f52765e478fe„§cell_idÙ$2814a1d4-dcc0-11ea-3d42-f52765e478fe¤codeÙŽhint(md"For each extra cut, start out with the solution for the previous number. When you add one extra cut, how many new slices do you get?")¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$8b12d200-d474-11ea-3035-01eccf39f917„§cell_idÙ$8b12d200-d474-11ea-3035-01eccf39f917¤code¸large = 24.90 / area(15)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$6494e270-d503-11ea-38a7-df96e7f0a241„§cell_idÙ$6494e270-d503-11ea-38a7-df96e7f0a241¤code©cuts2 = 1¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$f147b6cc-d4ff-11ea-05ad-6f5b441e5d1b„§cell_idÙ$f147b6cc-d4ff-11ea-05ad-6f5b441e5d1b¤code¿two_medium_cost = 20.95 * 1 - 0¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$33b1975c-d45c-11ea-035f-ab76e46a31ed„§cell_idÙ$33b1975c-d45c-11ea-035f-ab76e46a31ed¤codeÚAif c == a * b correct(md"""**Great!** The value of c = $c. So you now have a simple computer! Now go back above and change the value of **a = $a** to **a = $(a + 3)** and press **`Shift-Enter`**. What is the new value of **c**? Notice how all the values get updated in this notebook! """) else keep_working() end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$1ba2c208-d4ff-11ea-0a8e-e75bf7e1c3e6„§cell_idÙ$1ba2c208-d4ff-11ea-0a8e-e75bf7e1c3e6¤codeÙŒif !isapprox(best_value, xl) hint(md"No need to copy these digits yourself - what should we assign to **best_value**?") else correct() end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$a42e4eb0-d474-11ea-316a-3d864451bc01„§cell_idÙ$a42e4eb0-d474-11ea-316a-3d864451bc01¤codeÙpmd"Which size of pizza is the best deal? Write your answer below and assign it to the variable **best_value**."¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$e0cb2822-dcc2-11ea-2c85-5748bfe526dc„§cell_idÙ$e0cb2822-dcc2-11ea-2c85-5748bfe526dc¤codeÙ=md"Have you found the pattern? Write down the formula below:"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$2eb9a560-d507-11ea-3b8b-9d06678fe131„§cell_idÙ$2eb9a560-d507-11ea-3b8b-9d06678fe131¤codeÙ5md"Now, how many pieces can be made with **4 cuts**?"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$50f0f6d6-d471-11ea-304e-8f72e7ef9d7e„§cell_idÙ$50f0f6d6-d471-11ea-304e-8f72e7ef9d7e¤code¨A = r^2¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$3da812c6-d460-11ea-0170-79fbb6a4347c„§cell_idÙ$3da812c6-d460-11ea-0170-79fbb6a4347c¤codeªslices = 8¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$5b07b8fe-d475-11ea-01aa-6b88d6ed8a05„§cell_idÙ$5b07b8fe-d475-11ea-01aa-6b88d6ed8a05¤codeÙ:md"""### 2. Calculate the cost per area of each pizza: """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$30f0f882-d45c-11ea-2adc-7d84ecf8a7a6„§cell_idÙ$30f0f882-d45c-11ea-2adc-7d84ecf8a7a6¤code¦c = 10¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$f26d50da-d46b-11ea-0c2d-77ca13532b3d„§cell_idÙ$f26d50da-d46b-11ea-0c2d-77ca13532b3d¤codeÚqif pizzas == people * avg / slices almost(md"Yes that is right! But we should round $pizzas up to an integer, otherwise the restaurant will be confused. Try `ceil(...)`!") elseif pizzas == ceil(people * avg / slices) correct(md"Yes that is right, that's a lot of pizza! Excellent, you figured out we need to round up the number of pizzas!") else keep_working() end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$16ec3f32-d4ff-11ea-20e2-5bc6dd5db083„§cell_idÙ$16ec3f32-d4ff-11ea-20e2-5bc6dd5db083¤code²best_value = small¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$d1e3dec0-d507-11ea-1213-d37a9325ee2f„§cell_idÙ$d1e3dec0-d507-11ea-1213-d37a9325ee2f¤codeÚ;md"Are you starting to see a pattern? Can you figure out a formula for how many pieces of pizza can be made with \"n\" cuts? Make a table and fill in the number of pieces for a number of cuts and see if you can find the pattern: Cuts | Pieces :--- | ------: 0 | 1 1 | 2 2 | 4 3 | 4 | "¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$57f024ae-d500-11ea-1cc4-ed28348fdf93„§cell_idÙ$57f024ae-d500-11ea-1cc4-ed28348fdf93¤codeÙ_md"""Is it a better deal to get two medium pizzas for \$5 off or to just buy an extra-large?"""¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$180c8fdc-d503-11ea-04ca-bf2c07fd1c17„§cell_idÙ$180c8fdc-d503-11ea-04ca-bf2c07fd1c17¤codeÙïmd"""### 4. Advanced Problem A new worker at a pizza shop was getting paid for cutting pizza into pieces. The pieces of pizza could be any size. Calculate the maximum number of pieces the worker could make with two cuts of the pizza."""¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$444e2fa4-d460-11ea-12aa-57e0576c2d66„§cell_idÙ$444e2fa4-d460-11ea-12aa-57e0576c2d66¤codeªpizzas = 1¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$03664f5c-d45c-11ea-21b6-91cd647a07aa„§cell_idÙ$03664f5c-d45c-11ea-21b6-91cd647a07aa¤codeÚ¥md"# Mathematics in Julia ðŸ�• This is an introduction to programming. Let's get started! ## Let's make a calculator! First let's do some simple math with setting **a = $a**, **b = $b** and **c = a * b**. What will **c** equal? Type in the cells (with the coloured background) below and press **`Shift-Enter`** or the click the right-arrow button (â–¶ï¸�) to the right to execute the cell after changing the values."¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$3823d09e-d474-11ea-194e-59b5805f303b„§cell_idÙ$3823d09e-d474-11ea-194e-59b5805f303b¤code·small = 13.10 / area(9)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$262b312a-d460-11ea-26c5-df30459effc5„§cell_idÙ$262b312a-d460-11ea-26c5-df30459effc5¤code«people = 10¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$a05aae8e-d506-11ea-190f-57e9ce53b8b9„§cell_idÙ$a05aae8e-d506-11ea-190f-57e9ce53b8b9¤code©cuts3 = 1¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$a38cb92e-d45e-11ea-2959-05be909befb2„§cell_idÙ$a38cb92e-d45e-11ea-2959-05be909befb2¤codeÚÕmd"""### Now you have a calculator! You did multiplication above. Here's how you do other mathematical operations: Operation | Type This :------------ | :-------------: add | + subtract | - multiply | * divide | / power | ^ ### Pizza Slices Let's try this out on a problem. Let's say you want to order pizzas for $people people (**people = $people**) and each person wants $avg slices on average (**avg = $avg**). A pizza has $slices slices per pizza (**slices = $slices**). How many pizzas should you order (**pizzas = ?**)? So we have the following Meaning | Variable :------ | :--------: Number of people | people Average number of slices each person eats | avg Number of slices on a piece of pizza | slices """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$19eb2a82-d500-11ea-3782-596adc689382„§cell_idÙ$19eb2a82-d500-11ea-3782-596adc689382¤code¾two_medium_area = 1 * area(13)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$8700d986-d475-11ea-0d0e-790448cf92ba„§cell_idÙ$8700d986-d475-11ea-0d0e-790448cf92ba¤codeÚýlet ans = (pi * (17 / 2)^2) / (pi * (9 / 2)^2) if smalls_in_xl == 1 hint(md"""The diameter of the XL pizza is 17 inches while the diameter of the small pizza is 9 inches. Use the **area()** function from before to find the area of each and divide them.""") elseif smalls_in_xl < ans - 4 * eps(ans) md"""Keep trying, your answer is too low.""" elseif smalls_in_xl > ans + 4 * eps(ans) md"""Keep trying, your answer is too high.""" else md"""**Great!** You got it right. Let's move on.""" end end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$4dff4b5e-d461-11ea-29c8-d548fdb5f08b„§cell_idÙ$4dff4b5e-d461-11ea-29c8-d548fdb5f08b¤codeÙ‰md"Edit the equation below to calculate the number of pizzas to order using the variables above for **people**, **avg**, and **slices**:"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$637c26fa-d475-11ea-2c5b-2b0f4775b119„§cell_idÙ$637c26fa-d475-11ea-2c5b-2b0f4775b119¤code°smalls_in_xl = 1¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$bae0cb62-dcc2-11ea-0667-512e1c407d40„§cell_idÙ$bae0cb62-dcc2-11ea-0667-512e1c407d40¤code©cuts5 = 1¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$0d76d97c-d500-11ea-2433-e96c6fc43b05„§cell_idÙ$0d76d97c-d500-11ea-2433-e96c6fc43b05¤codeÙ2md"Calculate the total area of two medium pizzas:"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$92b4a012-d503-11ea-15a2-1f3a446d3284„§cell_idÙ$92b4a012-d503-11ea-15a2-1f3a446d3284¤codeÙsmd"Now what about 3 cuts across the pizza? What is the maximum number of pieces that can be made with **3 cuts**?"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$3c12f2b4-d471-11ea-2d37-539f061f7cf2„§cell_idÙ$3c12f2b4-d471-11ea-2d37-539f061f7cf2¤code¥r = 6¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$2ed4bb92-d45c-11ea-0b31-2d8e32ce7b44„§cell_idÙ$2ed4bb92-d45c-11ea-0b31-2d8e32ce7b44¤code¥b = 6¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$5a8ede88-d507-11ea-30d9-c99a67243781„§cell_idÙ$5a8ede88-d507-11ea-30d9-c99a67243781¤code©cuts4 = 1¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$5df7eefc-d507-11ea-0d1f-45b224a04774„§cell_idÙ$5df7eefc-d507-11ea-0d1f-45b224a04774¤codeÚYif cuts4 == 11 correct(md"That was a tough question. How did you figure it out? You tried hard.") elseif cuts4 < 10 hint(md"Draw it out on a piece of paper. You can make more pieces with 4 cuts.") elseif cuts4 < 11 hint(md"Getting close but you can make more pieces with 4 cuts.") else hint(md"That is too high. Only straight lines!") end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$b8644fb0-daa6-11ea-1e94-9bf46e7b0fad„§cell_idÙ$b8644fb0-daa6-11ea-1e94-9bf46e7b0fad¤codeÙFhint(text) = Markdown.MD(Markdown.Admonition("hint", "Hint", [text]));¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedënotebook_idÙ$ca9274f0-b8ad-11f1-8dd6-8f565dbb3b75«in_temp_dir¨metadata�«frontmatter‡«license_urlÙghttps://github.com/JuliaPluto/featured/blob/2a6a9664e5428b37abe4957c1dca0994f4a8b7fd/LICENSES/Unlicense¦author‘‚¤name¨Pluto.jl£url½https://github.com/JuliaPluto¥imageÙdhttps://user-images.githubusercontent.com/6933510/174066114-bc76964d-6ed1-491a-baa0-5063e3b08a17.png¥order¡2¤tags’¥basic§classic§license©Unlicense«descriptionÙ-Learn mathematics in Julia using pizzas! ðŸ�•